import axios from '@/api/fetch';
//import * as types from './types';
import SERVER from '@/api/server';

//旧件回运查询
//旧件回运查询 - 主页面查询
export const getListByPage = params => axios.post(`${SERVER.CLAIMDEALER}/rPReturn/getListByPage`,  params );

// 选择旧件列表
export const getDestoryListByPage = params => axios.post(`${SERVER.CLAIMDEALER}/rPCmsClaim/getDestoryListByPage`,  params );

export const getReturnListByPage = params => axios.post(`${SERVER.CLAIMDEALER}/rPCmsClaim/getReturnListByPage`,  params );

//通过ID查
export const selectById = params => axios.get(`${SERVER.CLAIMDEALER}/rPReturn/selectByIdNew/${params.id}`);

//导出
export const getListForExport = (params) => axios.post(`${SERVER.CLAIMDEALER}/rPReturn/getListForExport`, params, {
  responseType: 'blob'
});

//通过ID打印
export const printById = params => axios.get(`${SERVER.CLAIMDEALER}/rPReturn/printById/${params.id}`);


export const generateLabel = params => axios.get(`${SERVER.CLAIMDEALER}/rPReturn/generateLabel`, { params });

//标签
export const generateLabelList = params => axios.get(`${SERVER.CLAIMDEALER}/rPReturn/generateLabelList`, { params });



